Simplifying Movement of Data to Different Desired Storage Portions Depending on the State of the Corresponding Transaction

ABSTRACT

A user may merely need to specify various states of transactions and actions to be performed upon reaching a state for the corresponding transaction, and a front end block may automatically perform an action when the corresponding state is reached. Each action may indicate any necessary movement of data to a new storage portion. As a result, a programmer can be shielded from various details (e.g., which database to store the data in, data format conversions) in (developing the code for) processing the transactions.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to database systems, and more specifically to a method and apparatus for simplifying movement of data to different desired storage portions depending on the state of the corresponding transaction.

2. Related Art

Data is often maintained and stored to support corresponding transactions. For example, in an order processing system, data is stored to indicate whether a corresponding order (example of a transaction) has been processed, placed on hold, or awaiting payment, etc. Often the data is stored in databases to facilitate structured querying and storage, as is well known in the relevant arts.

There is a recognised need to move data from one storage portion to anther depending on the state of the corresponding transaction. For example, different storage portions may have different levels of physical security, backup (duplication) facilities, etc., and it be desirable to store more critical data in areas with higher security and with more backup facilities.

In the case of databases, the data related to a transaction may be moved to different databases or tables. As an illustration, once a sale is complete, the data may be moved to another database which is owned or operated by a different business group (e.g., finance). On the other hand, data may be moved to different tables for example due to the organization of different columns of data in different relational database tables.

In one prior approach associated with database systems, a programmer drafts specific pieces of code to move the data to different portions in each type of situation, according to the design requirements. The specific pieces of code may be embedded within the applications. Alternatively, in an approach referred to as ‘triggers’, specific pieces of code are executed upon occurrence of specified events, which again achieve the movement objective.

Unfortunately, in such approaches, the burden of developing the specific pieces of code is with programmers, and may be unacceptable at least in some circumstances. What is therefore needed is a a method and apparatus for simplifying movement of data to different desired storage portions depending on the state of the corresponding transaction.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention will be described with reference to the accompanying drawings briefly described below.

FIG. (FIG.) 1 is a block diagram of an example environment in which various aspects of the present invention can be implemented.

FIG. 2 is a flow chart illustrating the manner in which a front-end block may simply implementation of movement of data portions across databases in an embodiment of the present invention.

FIG. 3A contains a table schema used to illustrate example operations in an embodiment of the present invention.

FIG. 3B illustrates the various states of a transaction and the target databases in which the data related to the transaction is to be stored in an embodiment of the present invention.

FIG. 3C illustrates the manner in which a user may specify different data portions to which data is to be moved in an embodiment of the present invention.

FIG. 4 contains a table illustrating a simplified query which may be generated by an application block implemented by users and the corresponding modified query and additional queries generated by a front-end block in an embodiment of the present invention.

FIG. 5 is a block diagram illustrating an example embodiment in which various aspects of the present invention are operative when software instructions are executed.

In the drawings, like reference numbers generally indicate identical, functionally similar, and/or structurally similar elements. The drawing in which an element first appears is indicated by the leftmost digit(s) in the corresponding reference number.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

1. Overview

According to an aspect of the present invention, a user may merely need to specify various states of transactions and actions to be performed upon reaching a state for the corresponding transaction, and a front end block may automatically perform an action when the corresponding state is reached. Each action may indicate any necessary movement of data to a new storage portion. As a result, a programmer can be shielded from various details (e.g., which database to store the data in) in (developing the code for) processing the transactions.

According to another aspect of the present invention, the front end block modifies the queries automatically to conform the data (to be stored) to the data format of the target storage portion in which the data is to be stored. As a result, the programmer may be shielded from additional details related to differences in data formats as well.

Various aspects of the present invention are described below with reference to an example problem. Several aspects of the invention are described below with reference to examples for illustration. It should be understood that numerous specific details, relationships, and methods are set forth to provide a full understanding of the invention. One skilled in the relevant art, however, will readily recognize that the invention can be practiced without one or more of the specific details, or with other methods, etc. In other instances, well_known structures or operations are not shown in detail to avoid obscuring the features of the invention.

2. EXAMPLE ENVIRONMENT

FIG. 1 is a block diagram illustrating an example environment in which various aspects of the present invention can be implemented. The environment is shown containing client systems 110A-110N, network 120, and server system 140 in turn containing databases 150A-150N, front-end block 160, and application block 170. Each system/block is described below in further detail.

Network 120 provides the connectivity between client systems 110A-110N and server system 140. Client systems 110A-110N enable users to conduct various transactions, and client systems 110A-110N exchange data with server system 140 to support the transactions.

Databases 150A-150N represent different storage portions, and enable data to be stored and retrieved using structured queries (e.g., compatible with SQL, well known in the relevant arts). In general, each database contains one or more tables according to corresponding schemas, and data in the table is accessed (read/write) using structured queries. Access to the tables is enabled by opening the database.

Application block 170 receives data from client systems 110A-110N, and generates various queries to databases 150A-150N. Front-end block 160 receives the queries and interfaces with databases 150A-150N to perform the desired actions. Front-end block 160 simplifies the implementation logic of application block 170 at least with respect to movement of data between databases 150A-150N, as described below in further detail.

3. Flow-Chart

FIG. 2 is a flow-chart illustrating the manner in which a front-end block may operate according to an aspect of the present invention. The flow chart is described with reference to FIG. 1 merely for illustration. However, the features can be implemented in other environments/systems as well. The flow chart begins in step 201, in which control immediately passes to step 210.

In step 210, front-end block 160 receives configuration data indicating the various states of transactions and actions to be performed upon reaching a state for the corresponding transaction. The actions associated with (transition to) each state indicate any necessary movement of data to a new storage portion.

In step 220, front-end block 160 receives from application block 170 transaction data indicating the new state of a transaction. Application block 170 may in turn have generated such data in response to data received from client system 110A. For example, when an order is shipped and the corresponding data is entered by a user using client system 110A, application block 170 may send to front-end block 160 data indicating the new state of the transaction.

In step 230, front-end block 160 determines the action to be performed corresponding to the new state according to step 210. In step 250, front-end block 160 executes the corresponding actions. Thus, the data indicated in step 210 determines the actions (including movement of data to different storage portions and any necessary conversion of data formats) which are performed. Control then passes to step 220.

From the above, it may be appreciated that a programmer simply needs to specify the actions of step 210, and front-end block 160 can be designed to automatically execute the actions. The manner in which the actions can be specified and the manner in which front-end block 160 can be implemented is described below in further detail.

4. Specifying States and Associated Desired Actions

FIGS. 3A-3C together illustrate the manner in which states and desired associated actions may be specified in an embodiment of the present invention. In particular, FIG. 3A contains an example table structure used to support transactions in an order processing system, FIG. 3B contains the various states that a transaction may go through, and FIG. 3C indicates the desired movement to different data portions as a transaction progresses through different states. Each Figure is described below in further detail.

With respect to FIG. 3A, there is a shown a table containing columns order-number 311, order-date 312, order-type 313, order-price 314, order-quantity 315 and order-state 316. The columns are not described in detail (except as needed for understanding the features of the present invention) as being self-explanatory. Order-state 316 can have several values (states) as described below with respect to FIG. 3B.

FIG. 3B indicates the various possible states of a transaction, and the database (data portion) in which the data related to the transaction is to be stored corresponding to each state. The table contains three columns 321-323, and four rows 331-334. As shown in column 321, the data needs to be in database 150A when/if a transaction is in one of {order-received, order-primaryCheck, order-reject and order-process} states, in database 150B when/if a transaction is in one of {order-startProcess, order-on Hold, order-release, order-valid} states, and database 150C when/if the transaction is in one of {order-payment, order-shipment, order-closed, order-passive} states.

The sequence of states in which a transaction goes through in normal course is shown row-wise from top to down, and then to then column wise from left to right. Thus, the sequence of states is: order-received, order-primaryCheck, order-reject and order-process, order-startProcess, order-on Hold, order-release, order-valid, order-payment, order-shipment, order-closed, and order-passive in that order. From the above noted understanding of the data movement requirements, a user may specify the actions as shown below with respect to FIG. 3C.

FIG. 3C contains a table indicating the actions to be performed if/when a transaction reaches each state of interest. The table is shown containing five columns—order-state 341, target-database 342, table 343, operation 344 and rule 345, and twelve rows 351-362. The columns and rows are described below in further detail.

Order-state 341 indicates the state (or entry into that state) at which the corresponding actions are to be performed. Target-database 342 indicates the specific database to which the data is to be moved. Table column 343 indicates the table to which the updated data is to be moved. Operation 344 specifies the specific action to be performed on table 343, and rule 345 specifies any additional actions which may need to be performed corresponding to the state.

Row 351 indicates that the data is to be ‘inserted’ into a table entitled order-table within database 150A (column 342). This implies that a new transaction is received and thus a new row is being inserted into the table, as specified. In addition, rule 345 indicates that a discount of 20% is to be given if order-date is later than Dec. 12, 2000.

Row 352 indicates that data is to be stored in database 150A if the order state equals Order-primaryCheck, and the row in order-Table table is to be updated. In addition, rule 345 indicates that a row is inserted into another table Order-premium of database 150A, with the values corresponding to order-number and order-quantity. Rows 353 and 354 also indicate that the data is to be stored in database 150A if the order state respectively equals order-reject and order-process. In addition, in row 354, given the target column 342 and table column 343 respectively indicate ‘150C’ and ‘Order-table’, the data received with the update operation is stored in order-table of database 150C.

Rows 355, 356, 357 and 358 indicate that data is to be stored in database 150B when/if the status of the transaction is in one of order-startProcess, order-on Hold, order-release, order-valid states respectively. Row 355 indicates in addition that the row corresponding to order-number is to be deleted from database 150A (which in effect amounts to a move, along with the insert operation).

Rows 359, 360, 361 and 362 indicate that the data is to be stored inbase 150C when/if the transaction is in one of order-payment, order-shipment, order-closed, and order-passive states respectively. Row 359 indicates in addition that the row corresponding to order-number is to be deleted from database 150B. Thus, the transaction details are eventually present only in database 150C.

Front-end block 160 may receive queries without various details already specified in the table of FIG. 3C, and yet provide the desired functionality as described below with respect to FIG. 4.

5. Query Processing

FIG. 4 contains a table indicating query processing by using the table described above with respect to FIG. 3C. The table is shown containing three columns simplified query 401, modified query 402 and additional query 403. The entries in simplified query 401 are generated by application block 170, and the corresponding entries in modified query 402 and additional query 403 are generated by front-end block 160 using the information present in FIG. 3C. Each row 421-424 is described below in further detail.

Row 421 contains a simplified query {Insert into order-table values (999, 12-13-2000, Standard, 54, 25, ‘order-received’)} indicating that a row is to be created with values of 999, 12-13-2000, Standard, 54, 25, ‘order-received’ for columns order-number 311, order-date 312, order-type 313, order-price 314, order-quantity 315 and order-state 316 respectively. It may be appreciated that various details such as the specific database is not specified by the simplified query.

The corresponding modified query reads {Insert into 150A.order_table values (999, 12_(—)13_(—)2000, Standard, 54, 25, ‘order_received’)}, filling some of the information from the table of FIG. 3C. The information is filled using the information in row 351 based on the matching value of order-state. An additional query {Update 150A.order_table set order_table.order_price=order_table.order_price−(20* order_table.order_price/100)} is also generated corresponding to the rule specified in row 351.

Row 422 contains a simplified query {Update order_table set order_state=‘order_primaryCheck’ where order_number=999}. Front-end block 160 determines that row 352 is the matching row for the order status, and generates a modified query which reads {Update 150A.order_table set order_table.order_state=‘order_primaryCheck’ where order_table.order_number=999} and an additional query which reads {Insert into 150A.order_premium values (999, 25)}. It is assumed that the additional query is executed after the modified query in every case.

Row 423 contains a simplified query {Update order_table set order_state=‘order_startProcess’ where order_number=999}. The matching row 355 indicates that a target database of 150B is to be used for the update operation. Accordingly, application block 170 generates a modified query of {Update 150B.order_table set order_table.order_state=‘order_startProcess’ where order_table.order_number=999}, and an additional query of {Delete from 150A.order_table where order_table.order_number=999}.

Front-end block 160 sends the modified query and the additional query corresponding to each simplified to the specific database specified in each query. As may be appreciated from the above, the implementation of application block 170 is simplified since some of the database identifier details are not needed, and routine operations such deletions and special cases (discounts) can be set as rules.

Row 424 illustrates additional simplifications which may be obtained in implementation of application block 170. In several instances, the data formats used to store the same information is different in different databases. The modified query of row 424 is generated on the assumption that database 150C stores data in XML format, while the data presented by application block 170 is in some other format (e.g., char, varchar, date). The difference in format may also be specified in the table of FIG. 3C (not shown), and the modified query can be generated as shown. The implementation of application block 170 is simplified further due to the feature.

While the above examples are illustrated with respect to moving data to different databases, it should be understood that data can potentially be moved to different tables within the same database by appropriate modifications to the table of FIG. 3C. It should be further appreciated that the features described above can be implemented in various embodiments. The description is continued with respect to an embodiment in which various features are operative when software instructions are executed.

6. Digital Processing System

FIG. 5 is a block diagram illustrating the details of digital processing system 500 in which various aspects of the present invention are operative by execution of appropriate software instructions. System 500 may correspond to server system 140. System 500 may contain one or more processors such as central processing unit (CPU) 510, random access memory (RAM) 520, secondary memory 530, graphics controller 560, display unit 570, network interface 580, and input interface 590. All the components except display unit 570 may communicate with each other over communication path 550, which may contain several buses as is well known in the relevant arts. The components of FIG. 5 are described below in further detail.

CPU 510 may execute instructions stored in RAM 520 to provide several features of the present invention. CPU 510 may contain multiple processing units, with each processing unit potentially being designed for a specific task. Alternatively, CPU 510 may contain only a single general purpose processing unit. RAM 520 may receive instructions from secondary memory 530 using communication path 550.

Graphics controller 560 generates display signals (e.g., in RGB format) to display unit 570 based on data/instructions received from CPU 510. Display unit 570 contains a display screen to display the images defined by the display signals. Input interface 590 may correspond to a key_board and/or mouse. Network interface 580 provides connectivity to a network (e.g., using Internet Protocol), and may be used to communicate with client systems 110A-110N.

Secondary memory 530 may contain hard drive 535, flash memory 536 and removable storage drive 537. Secondary memory 530 may store the data and software instructions (e.g., methods instantiated by each of client system), which enable system 500 to provide several features in accordance with the present invention. Some or all of the data and instructions may be provided on removable storage unit 540, and the data and instructions may be read and provided by removable storage drive 537 to CPU 510. Floppy drive, magnetic tape drive, CD_ROM drive, DVD Drive, Flash memory, removable memory chip (PCMCIA Card, EPROM) are examples of such removable storage drive 537.

Removable storage unit 540 may be implemented using medium and storage format

compatible with removable storage drive 537 such that removable storage drive 537 can read

the data and instructions. Thus, removable storage unit 540 includes a computer readable storage medium having stored therein computer software and/or data.

In this document, the term “computer program product” is used to generally refer to removable storage unit 540 or hard disk installed in hard drive 535. These computer program products are means for providing software to system 500. CPU 510 may retrieve the software instructions, and execute the instructions to provide various features of the present invention described above.

7. CONCLUSION

While various embodiments of the present invention have been described above, it should be understood that they have been presented by way of example only, and not limitation. Thus, the breadth and scope of the present invention should not be limited by any of the above described exemplary embodiments, but should be defined only in accordance with the following claims and their equivalents. 

1. A software implemented method to simplify a programmer's task of moving data to different storage portions depending on the state of the corresponding transaction, said method comprising: storing data related to a first transaction in a first storage portion; receiving a configuration data indicating one or more actions to be performed associated with each of a plurality of states of transactions; receiving a transaction data indicating a new state of said first transaction; determining a first set of actions to be performed associated with said new state according to said configuration data; and executing said first set of actions in response to said receiving, wherein said first set of actions specify moving data related to said first transaction from said first storage portion to a second storage portion, wherein said programmer developing code to process said first transaction is relieved of the task of having to specify movement of data related to said first transaction from said first storage portion to said second storage portion.
 2. The method of claim 1, wherein said first portion and second portion respectively comprise a first table and a second table in a database.
 3. The method of claim 1, wherein said first portion and second portion respectively comprise a first database and a second database, whereby said programmer can develop code with a view of a single database even though data related to said first transaction is stored in different databases in different states.
 4. The method of claim 3, wherein said configuration data comprises a table containing columns specifying a present state, a database in which the data related to the transaction is to be stored, and a rule, wherein said rule indicates any additional actions which are to be performed corresponding to said present state.
 5. The method of claim 4, wherein said first database stores a portion of said first transaction according to a first format and said second database stores said portion according to a second format, said method further comprising converting said portion from said first format to said second automatically such that said programmer is relieved of conversion task.
 6. The method of claim 5, wherein said second format comprises extended Meta Language (XML).
 7. The method of claim 5, wherein said first transaction is related to order processing.
 8. A computer readable medium carrying one or more sequences of instructions causing a digital processing system to simplify a programmer's task of moving data to different storage portions depending on the state of the corresponding transaction, wherein execution of said one or more sequences of instructions by one or more processors contained in said digital processing system causes said one or more processors to perform the actions of: storing data related to a first transaction in a first storage portion; receiving a configuration data indicating one or more actions to be performed associated with each of a plurality of states of transactions; receiving a transaction data indicating a new state of said first transaction; determining a first set of actions to be performed associated with said new state according to said configuration data; and executing said first set of actions in response to said receiving, wherein said first set of actions specify moving data related to said first transaction from said first storage portion to a second storage portion, wherein said programmer developing code to process said first transaction is relieved of the task of having to specify movement of data related to said first transaction from said first storage portion to said second storage portion.
 9. The computer readable medium of claim 1, wherein said first portion and second portion respectively comprise a first table and a second table in a database.
 10. The computer readable medium of claim 1, wherein said first portion and second portion respectively comprise a first database and a second database, whereby said programmer can develop code with a view of a single database even though data related to said first transaction is stored in different databases in different states.
 11. The computer readable medium of claim 10, wherein said configuration data comprises a table containing columns specifying a present state, a database in which the data related to the transaction is to be stored, and a rule, wherein said rule indicates any additional actions which are to be performed corresponding to said present state.
 12. The computer readable medium of claim 11, wherein said first database stores a portion of said first transaction according to a first format and said second database stores said portion according to a second format, further comprising converting said portion from said first format to said second automatically such that said programmer is relieved of conversion task.
 13. The computer readable medium of claim 12, wherein said second format comprises extended Meta Language (XML).
 14. The computer readable medium of claim 12, wherein said first transaction is related to order processing. 